Add Method (Folders Collection) 

The Add method creates and returns a new FolderKM47H0 object in the Folders collection.

Syntax

Set objFolder = objFoldersColl.Add(name)

Parameters

objFolder

On successful return, contains the new Folder object.

objFoldersColl

Required. The Folders collection object.

name

Required. String. The display name of the folder.

 

Remarks

The name parameter corresponds to the NameTPEIWF property of the Folder object.

The user must have permission to Add or DeleteY7GHQ6 a Folder object. Most users have this permission only for their personal folders.

The new FolderKM47H0 object is saved in the MAPI system when you call its UpdateCEIX8P method.

Example

This code fragment adds a new folder to a user s Inbox:

Dim myInbox, newFolder As Object

Set myInbox = MAPI.Session.Inbox

' add new folder to Inbox

Set newFolder = myInbox.Add  Personal Messages 

' commit new folder to collection

myInbox.Update